package com.sengled.cloud.biz.union.mgt.dao.sys;

import com.sengled.cloud.biz.union.mgt.model.po.UserRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserRoleDao {
    int deleteByPrimaryKey(Long id);

    int insert(UserRole record);

    int insertSelective(UserRole record);

    UserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserRole record);

    int updateByPrimaryKey(UserRole record);

    @Delete("delete from user_role where role_id = #{roleId}")
    Integer deleteByRoleId(@Param("roleId") Long roleId);

    @Update("update user_role set enable_mark = #{enableMark} where role_id = #{roleId} ")
    int updateEnableMarkByRoleId(@Param("roleId") Long roleId,@Param("enableMark") Integer enableMark);

    @Update("update user_role set seal_mark = 1 where role_id = #{roleId} ")
    int updateSealMarkByRoleId(@Param("roleId") Long roleId);
}